package <%-props.packageName%>.<%-props.mapperPackage%>;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import <%-props.packageName%>.<%-props.entityPackage%>.<%-tb.className%>;
 
<%
var className = tb.className;
%>

@Mapper
public interface <%-className%>Mapper {
		<%if(!props.Simple){%>
		/**
		 * 查询全部,一般不用
		 * @return
		 */
		List<<%-className%>> findAll();


		/**
		 * 分页查询
		 * @return
		 */
		List<<%-className%>> findByPage(@Param("num")Integer num,@Param("size")Integer size);
		
		/**
		 * 根据<%-className%>对象查询
		 * @return
		 */
		List<<%-className%>> findByPojo(<%-className%> <%-tb.camel%>);

		/**
		 * 更新
		 * 请必须提供主键
		 * @return
		 */
		Boolean updateByPojo(<%-className%> <%-tb.camel%>);


		<%-include(extrucPath(path.join(dirname,"uni.ejs")),{tb:tb,className:className})%>
		
		/**
		 * 插入单条
		 * @return
		 */
		Boolean insert(<%-className%> <%-tb.camel%>);
		
		/**
		 * 插入多条
		 * @return
		 */
		Boolean insertList(List<<%-className%>> <%-tb.camel%><%-props.listName%>);
		
		<%}%>

}
